﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace ProjectM2Work.Pages
{
    public partial class PageChuong02 : PhoneApplicationPage
    {
        bool isScale = false;
        public PageChuong02()
        {
            InitializeComponent();
        }

        private void image1_MouseLeave(object sender, MouseEventArgs e)
        {
            if(isScale == true)
            {
                btn_truonghoc.Height = btn_truonghoc.Height / 1.1f;
                btn_truonghoc.Width = btn_truonghoc.Width / 1.1f;
                isScale = false;
                
            }
        }

        private void image1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (isScale == false)
            {
                btn_truonghoc.Height = btn_truonghoc.Height * 1.1f;
                btn_truonghoc.Width = btn_truonghoc.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_truonghoc_MouseMove(object sender, MouseEventArgs e)
        {
            if (isScale == false)
            {
                btn_truonghoc.Height = btn_truonghoc.Height * 1.1f;
                btn_truonghoc.Width = btn_truonghoc.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_giadinh_MouseLeave(object sender, MouseEventArgs e)
        {
            if (isScale == true)
            {
                btn_giadinh.Height = btn_giadinh.Height / 1.1f;
                btn_giadinh.Width = btn_giadinh.Width / 1.1f;
                isScale = false;
            }
        }

        private void btn_giadinh_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (isScale == false)
            {
                btn_giadinh.Height = btn_giadinh.Height * 1.1f;
                btn_giadinh.Width = btn_giadinh.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_giadinh_ImageFailed(object sender, ExceptionRoutedEventArgs e)
        {

        }

       
        private void btn_giadinh_MouseMove(object sender, MouseEventArgs e)
        {
            if (isScale == false)
            {
                btn_giadinh.Height = btn_giadinh.Height * 1.1f;
                btn_giadinh.Width = btn_giadinh.Width * 1.1f;
                isScale = true;
            }
        }
        private void btn_nauan_MouseMove(object sender, MouseEventArgs e)
        {
            if (isScale == false)
            {
                btn_nauan.Height = btn_nauan.Height * 1.1f;
                btn_nauan.Width = btn_nauan.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_nauan_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (isScale == false)
            {
                btn_nauan.Height = btn_nauan.Height * 1.1f;
                btn_nauan.Width = btn_nauan.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_nauan_MouseLeave(object sender, MouseEventArgs e)
        {
            if (isScale == true)
            {
                btn_nauan.Height = btn_nauan.Height / 1.1f;
                btn_nauan.Width = btn_nauan.Width / 1.1f;
                isScale = false;
            }
        }

        private void btn_mucluc_MouseLeave(object sender, MouseEventArgs e)
        {
            if (isScale == true)
            {
                btn_mucluc.Height = btn_mucluc.Height / 1.1f;
                btn_mucluc.Width = btn_mucluc.Width / 1.1f;
                isScale = false;
            }
        }

        private void btn_mucluc_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (isScale == false)
            {
                btn_mucluc.Height = btn_mucluc.Height * 1.1f;
                btn_mucluc.Width = btn_mucluc.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_mucluc_MouseMove(object sender, MouseEventArgs e)
        {
            if (isScale == false)
            {
                btn_mucluc.Height = btn_mucluc.Height * 1.1f;
                btn_mucluc.Width = btn_mucluc.Width * 1.1f;
                isScale = true;
            }
        }

        private void btn_mucluc_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/PageBaiGiang.xaml", UriKind.Relative));
        }

        private void btn_truonghoc_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/PageSchoolTopic.xaml?Type=1", UriKind.Relative));
        }

        private void btn_giadinh_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/PageSchoolTopic.xaml?Type=2", UriKind.Relative));
        }

        private void btn_nauan_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/PageSchoolTopic.xaml?Type=3", UriKind.Relative));
        }


    }
}